<div data-role="tabsview">
    <div data-role="fieldcontain">
        <h3>
            Datos B&aacute;sicos
        </h3>
        <label for="nombre">Nombre:</label>
        <input type="text" value="{$buque->getNombre()}" id="nombre" name="{bind to="nombre"}" />

        <label for="imo">N&uacute;mero IMO:</label>
        <input type="number" value="{$buque->getImo()}" id="imo" name="{bind to="imo"}" />

        <label for="bandera">Bandera:</label>
        <select id="bandera" name="{bind to="idPais"}" data-native-menu="false">
            {foreach $paises as $pais}
                <option value="{$pais->getIdPais()}" {if $pais->getIdPais() == $buque->getIdPais()}selected{/if}>{$pais->getNombre()}</option>
            {/foreach}
        </select>

        <label for="linea">Linea:</label>
        <select id="linea" name="{bind to="idLinea"}"  data-native-menu="false">
            {foreach $lineas as $linea}
                <option value="{$linea->getIdLinea()}" {if $linea->getIdLinea() == $buque->getIdLinea()}selected{/if}>{$linea->getNombre()}</option>
            {/foreach}
        </select>

        <label for="email">Email:</label>
        <input type="email" value="{$buque->getEmail()}" id="email" name="{bind to="email"}" placeholder="email@example.com"/>
    </div>

    <div data-role="fieldcontain">
        <h3>
            Caracter&iacute;sticas
        </h3>
        <label for="numeroOficial">N&uacute;mero oficial:</label> 
        <input type="number" value="{$buque->getNumeroOficial()}" id="numeroOficial" name="{bind to="numeroOficial"}" />

        <label for="anio">A&ntilde;o de Construcci&oacute;n:</label>
        <input type="number" value="{$buque->getAnio()|default:"1980"}" id="anio" name="{bind to="anio"}" />

        <label for="puertoMatricula">Puerto de Matr&iacute;cula:</label>
        <input type="number" value="{$buque->getPuertoMatricula()}" id="puertoMatricula" name="{bind to="puertoMatricula"}" />

        <label for="material">Material del Casco:</label>
        {$values = array()}
        {$values["1"] = "Acero"}
        {$values["2"] = "Aluminio"}
        {$values["3"] = "Madera"}
        {$values["4"] = "Fibra de Vidrio"}
        {$values["5"] = "Otro"}
        <select name="{bind to="material"}" id="material" data-native-menu="false">
            {foreach $values as $k => $v}
                <option value="{$k}" {if $buque->getMaterial() == $k}selected{/if}>{$v}</option>
            {/foreach}
        </select>
    </div>

    <div data-role="fieldcontain">
        <h3>
            Dimensiones
        </h3>
        <label for="manga">Manga:</label> 
        <input type="number" value="{$buque->getManga()}" id="manga" name="{bind to="manga"}" />

        <label for="loa">Loa:</label>
        <input type="number" value="{$buque->getLoa()}" id="loa" name="{bind to="loa"}" />

        <label for="caladoMax">Calado M&aacute;ximo:</label>
        <input type="number" value="{$buque->getCaladoMax()}" id="caladoMax" name="{bind to="caladoMax"}" />

        <label for="velocidadMax">Velocidad M&aacute;xima:</label>
        <input type="number" value="{$buque->getVelocidadMax()}" id="velocidadMax" name="{bind to="velocidadMax"}" />
    </div>

    <div data-role="fieldcontain">
        <h3>
            Capacidad
        </h3>
        <label for="refersSocket">Refers Socket:</label>
        <input type="number" value="{$buque->getRefersSocket()}" id="refersSocket" name="{bind to="refersSocket"}" />

        <label for="gruas">Gruas:</label>
        <input type="number" value="{$buque->getGruas()}" id="gruas" name="{bind to="gruas"}" />

        <label for="hold">HOLD:</label>
        <input type="number" value="{$buque->getHold()}" id="hold" name="{bind to="hold"}" />

        <label for="capitan">Capit&aacute;n:</label>
        <input type="number" value="{$buque->getCapitan()}" id="capitan" name="{bind to="capitan"}" />

        <label for="teus">TEUS:</label>
        <input type="number" value="{$buque->getTeus()}" id="teus" name="{bind to="teus"}" />

        <label for="feus">FEUS:</label>
        <input type="number" value="{$buque->getFeus()}" id="feus" name="{bind to="feus"}" />


        <label for="pasajeros">Pasajeros:</label>
        <input type="number" value="{$buque->getPasajeros()}" id="pasajeros" name="{bind to="pasajeros"}" />

        <label for="tripulacion">Tripulaci&oacute;n:</label>
        <input type="number" value="{$buque->getTripulacion()}" id="tripulacion" name="{bind to="tripulacion"}" />
    </div>  

    <div data-role="fieldcontain">
        <h3>
            Calado
        </h3>
        <p>En toneladas</p>
        <label for="grossWight">Gross Weight:</label> 
        <input type="number" value="{$buque->getGrossWight()}" id="grossWight" name="{bind to="grossWight"}" />

        <label for="netWeight">Net Weight:</label>
        <input type="number" value="{$buque->getNetWeight()}" id="netWeight" name="{bind to="netWeight"}" />

        <label for="deadWeight">Dead Weight:</label>
        <input type="number" value="{$buque->getDeadWeight()}" id="deadWeight" name="{bind to="deadWeight"}" />
    </div> 

    <div data-role="fieldcontain">
        <h3>
            Armadores
        </h3>
        <label for="armador">Armador: </label> 
        <input type="text" value="{$buque->getArmador()}" id="armador" name="{bind to="armador"}" />

        <label for="fleteador">Fleteador: </label>
        <input type="text" value="{$buque->getFleteador()}" id="fleteador" name="{bind to="fleteador"}" />

        <label for="piClub">P & I Club: </label>
        <input type="text" value="{$buque->getPiClub()}" id="piClub" name="{bind to="piClub"}" />
        <div>
            <a href="{$back}" data-role="button" data-direction= "reverse" data-inline="true">Cancelar</a>
            <input type="submit" 
                   value="guardar" 
                   data-icon="check"
                   data-direction="reverse" 
                   data-inline="true"/>
        </div>
    </div>
</div>